package method;

import node.Node;

public class ListLength {
    public static int work(Node head) {
        int count=0;
        Node cur=head.next;
        while(cur!=null) {
            count++;
            cur=cur.next;
        }
        return count;
    }
}
